{
  "name": "Angi Lead Pitbull - Template",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "simple": false,
        "filters": {
          "q": "Subject: New Customer Match: Appliance Repair",
          "sender": "no-reply@angi.com"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.gmailTrigger",
      "typeVersion": 1.3,
      "position": [
        768,
        -208
      ],
      "id": "ecb97e3e-2bd7-4812-8857-f4a5e8929d4e",
      "name": "Gmail Trigger",
      "credentials": {
        "gmailOAuth2": {
          "id": "RaTsrmolHvJbOjlm",
          "name": "Gmail GVL"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "let text = $json.email_text || \"\";\n\n// Clean hidden or encoded characters\ntext = text\n  .replace(/&#173;/g, \"\") // remove soft hyphen\n  .replace(/&nbsp;/g, \" \")\n  .replace(/\\s+/g, \" \")\n  .trim();\n\n// Helper: extract with fallback\nfunction extract(regex) {\n  const match = text.match(regex);\n  return match ? match[1].trim() : \"\";\n}\n\nconst name = extract(/Customer Information\\s+([\\w\\s.'-]+)/i);\nconst phoneMatch = text.match(/\\(?(\\d{3})\\)?[-\\s]?(\\d{3})[-\\s]?(\\d{4})/);\nconst phone = phoneMatch ? phoneMatch.slice(1).join(\"\") : \"\";\nconst email = extract(/([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[A-Z]{2,})/i);\nconst address = extract(/(\\d{1,5}\\s[\\w\\s.,#-]+,\\s*[A-Z]{2}\\s*\\d{5})/);\nconst job_number = extract(/Job\\s*#[:\\-]?\\s*([0-9]+)/i);\nconst description = extract(/Repair or Service[^A-Z]*(.*?)Customer Information|Service description\\s*(.*?)Comments:/i);\nconst comments = extract(/Comments:\\s*([\\s\\S]*?)View Lead Details|Tips from Angi|Thank you|$/i);\n\n// Return structured result\nreturn [\n  {\n    json: {\n      name,\n      phone,\n      email,\n      address,\n      job_number,\n      description: description || \"\",\n      comments: comments || \"\",\n      source: \"Angi\",\n      raw_text: text\n    }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1168,
        -112
      ],
      "id": "8b4df153-1315-4623-a712-c5cc04fe89be",
      "name": "Extract Lead Info"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are a scheduling assistant for {{ $json.company_name }}, a home appliance repair service .\n\n#Your job:\n1. Read the customer's lead details.\n2. Analyze the information provided by the customer.\n3. Confirm the zipcode is withing our coverage are by using the google sheet table you have access to.\n4. If zip code is covered. Generate:\n   - A friendly SMS message to ask for more detail about the unit and schedule an appointment.\n   - A professional email message with slightly more detail.\n5. If zip code is Not Covered. Generate:\n   - A response explaining we do not service the area\n#Tone guidelines:\n- Friendly, confident, clear.\n- Not pushy.\n- Sound human, warm, and local.\n- Keep SMS short.\n- Email can have 3–5 short sentences.\n\n#SMS Template Sample if Zip code is covered:\nHi Clifford, this is {{ $json.company_name }}. We received your request to service your appliance. Which date works best for you to send a technician? Call us at (864) 900-0626 or reply to this message. You can also schedule online at www.appliancegm.com Thanks!\n\n#Email Template Sample if Zip code is covered: \nHi Clifford, This is {{ $json.company_name }}. Thank you for reaching out about your appliance issue. We service your area and would be happy to help. We currently have openings available, and we’d like to find a time that works best for you.\n\nYou can reply this email with a preferred date or you can call/text us at {{ $json.company_phone }}\n\nLooking forward to helping you,\n{{ $json.company_name }}\n\n#SMS Template Sample if Zip code is Not Covered:\nHi Clifford, this is {{ $json.company_name }}. We received your request to service your appliance, unfortunately we do not service your zipcode. \n\n# Include the customer's first name in both messages.\n\nBusiness details to reference:\n- Company: {{ $json.company_name }}\n- Service area: {{ $json.service_area }}\n- Phone: {{ $json.company_phone }}\n- Website: {{ $json.website }}\n\n#Output MUST be valid JSON exactly like this (no markdown, no commentary):\n\n{\n  \"sms_message\": \"...\",\n  \"email_message\": \"...\",\n  \"coverage\": \"...\",\n}\n\nHere is the Lead info:\nName: {{ $('Extract Lead Info').item.json.name }}\nPhone: {{ $('Extract Lead Info').item.json.phone }}\nEmail: {{ $('Extract Lead Info').item.json.email }}\nAddress: {{ $('Extract Lead Info').item.json.address }}\nDescription: {{ $('Extract Lead Info').item.json.description }}\nComments:{{ $('Extract Lead Info').item.json.comments }}\nSource: {{ $('Extract Lead Info').item.json.source }}\n\nRaw text in case the lead info is incomplete. {{ $('Extract Lead Info').item.json.raw_text }}\n\nTo Check if the address is within our service area of coverage extract the zip code and check on the Google Sheets table to confirm if the zip code is within that list. If the zip code is in the list return Covered for the json coverage. If is not within the list return Not Covered.\n\n",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3,
      "position": [
        1648,
        -112
      ],
      "id": "f4930d2d-acae-4f76-818e-bbdbbd8a4d63",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4-turbo",
          "mode": "list",
          "cachedResultName": "gpt-4-turbo"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        1456,
        112
      ],
      "id": "85763397-373a-48ce-8fac-6bec1d2cb5b6",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "9d01Yb8z3wRAj5tY",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "from": "YOUR_TWILIO_SMS_NUMBER",
        "to": "={{ $('Extract Lead Info').item.json.phone }}",
        "message": "={{ $json.sms_message }}",
        "options": {}
      },
      "type": "n8n-nodes-base.twilio",
      "typeVersion": 1,
      "position": [
        2448,
        -224
      ],
      "id": "90e3bddc-846d-43c8-af0c-9bd27b0a93a7",
      "name": "Send an SMS/MMS/WhatsApp message",
      "credentials": {
        "twilioApi": {
          "id": "Ax9LIVL1umbjUhiw",
          "name": "Twilio account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "={{ $('Extract Lead Info').item.json.email }}",
        "subject": "Service Request with Appliance GrandMasters",
        "message": "=<!DOCTYPE html>\n<html lang=\"en\" style=\"margin:0;padding:0;\">\n<head>\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width\">\n  <title>Schedule Your Appointment</title>\n  <style>\n    /* Keep styles minimal & inline-friendly for email clients */\n    .btn {\n      background:#0a7cff;\n      color:#ffffff !important;\n      text-decoration:none;\n      padding:12px 18px;\n      border-radius:8px;\n      display:inline-block;\n      font-weight:600;\n    }\n    .muted { color:#6b7280; }\n    .card {\n      border:1px solid #e5e7eb;\n      border-radius:12px;\n      padding:16px;\n      background:#ffffff;\n    }\n  </style>\n</head>\n<body style=\"margin:0;padding:0;background:#f7f7f8;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:#111827;\">\n\n\n  <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#f7f7f8;\">\n    <tr>\n      <td align=\"center\" style=\"padding:24px;\">\n        <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width:640px;\">\n          <!-- Header -->\n          <tr>\n            <td style=\"text-align:center;padding:12px 0 20px;\">\n              <div style=\"font-size:20px;font-weight:800;\">Appliance GrandMasters</div>\n              <div class=\"muted\" style=\"font-size:12px;line-height:1.4;\">\n                Greenville & surrounding areas\n              </div>\n            </td>\n          </tr>\n\n          <!-- Body -->\n          <tr>\n            <td class=\"card\">\n              <p style=\"margin:0 0 10px 0;\">Hi {{ $json.name || 'there' }},</p>\n              <p style=\"margin:0 0 10px 0;\">\n                Thanks for reaching out about your appliance issue. We service your area and have openings available. We’d love to get you on the schedule.\n              </p>\n\n            \n\n              <p style=\"margin:12px 0 16px 0;\">\n                Reply to this email with a preferred date, or use the options below:\n              </p>\n\n              <!-- CTA buttons -->\n              <div style=\"margin:10px 0 18px 0;\">\n                \n                  <a href=\"{{ $('Business Info').item.json.website }}\" class=\"btn\" target=\"_blank\" rel=\"noopener\">Schedule Online</a>\n                \n                <a href=\"tel:+{{ $('Business Info').item.json.company_phone }}\" class=\"btn\" style=\"background:#10b981;margin-left:8px;\">Call {{ $('Business Info').item.json.company_phone }}</a>\n              </div>\n\n              <p style=\"margin:0 0 8px 0;\">We look forward to getting this handled for you.</p>\n              <p style=\"margin:0 0 6px 0;\">The {{ $('Business Info').item.json.company_name }} Team</p>\n\n              <!-- Footer info -->\n              <hr style=\"border:none;border-top:1px solid #eee;margin:18px 0;\">\n              <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"font-size:12px;color:#6b7280;\">\n                <tr>\n                  <td>\n                    <div><strong>{{ $('Business Info').item.json.company_name }}</strong></div>\n                    <div>2421 New Easley Hwy, Greenville, SC 29611</div>\n                    <div><a href=\"{{ $('Business Info').item.json.website }}\" target=\"_blank\" style=\"color:#6b7280;text-decoration:underline;\">{{ $('Business Info').item.json.website }}</a> • {{ $('Business Info').item.json.company_phone }}</div>\n                  </td>\n                </tr>\n              </table>\n            </td>\n          </tr>\n\n          <!-- Tiny footer -->\n          <tr>\n            <td style=\"text-align:center;padding:12px 4px;color:#9ca3af;font-size:11px;\">\n              You’re getting this email because you requested service or matched with us on Angi.\n            </td>\n          </tr>\n        </table>\n      </td>\n    </tr>\n  </table>\n\n</body>\n</html>\n",
        "options": {
          "appendAttribution": false,
          "senderName": "Appliance GrandMasters"
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        2672,
        -224
      ],
      "id": "fdf38780-67df-48db-b0dd-3db23ac71538",
      "name": "Send a message",
      "webhookId": "1ad099b3-3842-4b60-8e6d-796a021fa065",
      "credentials": {
        "gmailOAuth2": {
          "id": "RaTsrmolHvJbOjlm",
          "name": "Gmail GVL"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1sAOJ_4f5_8nuCZmI4rhUDpPF-pXld1L0N8enIMRmxOw",
          "mode": "list",
          "cachedResultName": "ZipCode list for Map",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1sAOJ_4f5_8nuCZmI4rhUDpPF-pXld1L0N8enIMRmxOw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 579797096,
          "mode": "list",
          "cachedResultName": "Shared ZipCode List",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1sAOJ_4f5_8nuCZmI4rhUDpPF-pXld1L0N8enIMRmxOw/edit#gid=579797096"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.7,
      "position": [
        1584,
        112
      ],
      "id": "69a70f15-7007-4c19-bf7b-2f7e8acbdc09",
      "name": "Check Zip Code Coverage",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "e6ow0ICBmycDSAPC",
          "name": "Google Sheets Greenville"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.coverage }}",
                    "rightValue": "Covered",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "4f88db2a-ca76-4df5-944a-c2fc89d6f340"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Zip Covered"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "afad5895-9bee-4939-814c-7bfbc3022274",
                    "leftValue": "={{ $json.coverage }}",
                    "rightValue": "Not Covered",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Not Covered"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.3,
      "position": [
        2224,
        -112
      ],
      "id": "d4fd170d-0dbe-4018-82bc-faa4f916a21e",
      "name": "Switch"
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "simple": false,
        "filters": {
          "q": "Subject: New Lead",
          "sender": "no-reply@angi.com"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.gmailTrigger",
      "typeVersion": 1.3,
      "position": [
        768,
        -16
      ],
      "id": "c4fe736e-fa9f-4c42-b48a-8388c7cfb521",
      "name": "Gmail Trigger1",
      "credentials": {
        "gmailOAuth2": {
          "id": "RaTsrmolHvJbOjlm",
          "name": "Gmail GVL"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Pick the richest available body\nlet raw =\n  $json.html ||\n  $json.textAsHtml ||\n  $json.text ||\n  \"\";\n\n// --- HTML to Text Converter ---\nfunction htmlToText(str) {\n  return str\n    .replace(/<style[\\s\\S]*?<\\/style>/gi, \" \")\n    .replace(/<script[\\s\\S]*?<\\/script>/gi, \" \")\n    .replace(/<br\\s*\\/?>/gi, \"\\n\")\n    .replace(/<\\/p>/gi, \"\\n\")\n    .replace(/<[^>]+>/g, \" \")\n    .replace(/&nbsp;/g, \" \")\n    .replace(/&amp;/g, \"&\")\n    .replace(/\\s+/g, \" \")\n    .trim();\n}\n\n// --- RTF to Text Converter (rare, just in case) ---\nfunction rtfToText(input) {\n  return input\n    .replace(/\\\\par[d]?/g, \"\\n\")\n    .replace(/\\\\'[0-9a-f]{2}/gi, (match) => {\n      return String.fromCharCode(parseInt(match.slice(2), 16));\n    })\n    .replace(/\\\\[a-z]+\\d* ?/g, \"\")\n    .replace(/{\\\\[^{}]*}|[{}]/g, \"\")\n    .replace(/\\n{2,}/g, \"\\n\")\n    .trim();\n}\n\n// Convert depending on format\nlet email_text = \"\";\nif (!raw) {\n  email_text = \"[Warning] No email body found in Gmail message.\";\n} else if (raw.startsWith(\"{\\\\rtf\")) {\n  email_text = rtfToText(raw);\n} else if (/<[^>]+>/.test(raw)) {\n  email_text = htmlToText(raw);\n} else {\n  email_text = raw.trim();\n}\n\n// Final cleanup\nemail_text = email_text\n  .replace(/\\r/g, \"\\n\")\n  .replace(/\\n{2,}/g, \"\\n\")\n  .trim();\n\n// Return clean text\nreturn [\n  {\n    json: { email_text }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        992,
        -112
      ],
      "id": "0ab94f89-7da6-4c74-bb7b-6f7a3498094b",
      "name": "Clean Email"
    },
    {
      "parameters": {
        "jsCode": "return [\n  {\n    json: JSON.parse($json.output)\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2000,
        -112
      ],
      "id": "0879f537-0b79-48cb-bf8a-ff4f27fe2d4f",
      "name": "Parse Output"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "bb68780c-5614-421c-b067-f3d8de157f0e",
              "name": "company_name",
              "value": "YOUR_COMPANY_NAME",
              "type": "string"
            },
            {
              "id": "9d8cc8eb-3831-4701-b3de-9ede7e0c37ef",
              "name": "company_phone",
              "value": "YOUR_COMPANY_PHONE",
              "type": "string"
            },
            {
              "id": "887dbf11-02d0-4820-9ca3-b0ed1f726cd1",
              "name": "website",
              "value": "YOUR_WEBSITE",
              "type": "string"
            },
            {
              "id": "99ea00c6-bad0-4527-a3ed-c3f5e7a408e0",
              "name": "service_area",
              "value": "YOUR_SERVICE_AREA",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1376,
        -112
      ],
      "id": "cae6ce83-48b8-42c6-840c-c83a288e06f1",
      "name": "Business Info"
    },
    {
      "parameters": {
        "sendTo": "={{ $('Extract Lead Info').item.json.email }}",
        "subject": "Service Request with Appliance GrandMasters",
        "message": "=<!DOCTYPE html>\n<html lang=\"en\" style=\"margin:0;padding:0;\">\n<head>\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width\">\n  <title>We received your request</title>\n  <style>\n    /* Keep styles minimal & inline-friendly for email clients */\n    .btn {\n      background:#0a7cff;\n      color:#ffffff !important;\n      text-decoration:none;\n      padding:12px 18px;\n      border-radius:8px;\n      display:inline-block;\n      font-weight:600;\n    }\n    .muted { color:#6b7280; }\n    .card {\n      border:1px solid #e5e7eb;\n      border-radius:12px;\n      padding:16px;\n      background:#ffffff;\n    }\n  </style>\n</head>\n<body style=\"margin:0;padding:0;background:#f7f7f8;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:#111827;\">\n\n\n  <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#f7f7f8;\">\n    <tr>\n      <td align=\"center\" style=\"padding:24px;\">\n        <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width:640px;\">\n          <!-- Header -->\n          <tr>\n            <td style=\"text-align:center;padding:12px 0 20px;\">\n              <div style=\"font-size:20px;font-weight:800;\">{{ $('Business Info').item.json.company_name }}</div>\n              <div class=\"muted\" style=\"font-size:12px;line-height:1.4;\">\n                {{ $('Business Info').item.json.service_area }}\n              </div>\n            </td>\n          </tr>\n\n          <!-- Body -->\n          <tr>\n            <td class=\"card\">\n              <p style=\"margin:0 0 10px 0;\">Hi {{ $json.name || 'there' }},</p>\n              <p style=\"margin:0 0 10px 0;\">\n                Thanks for reaching out about your appliance issue. Unfortunately We service your area and have openings available. We’d love to get you on the schedule.\n              </p>\n\n            \n\n              <p style=\"margin:12px 0 16px 0;\">\n                Reply to this email with a preferred date, or use the options below:\n              </p>\n\n              <!-- CTA buttons -->\n              <div style=\"margin:10px 0 18px 0;\">\n                \n                  <a href=\"{{ $('Business Info').item.json.website }}\" class=\"btn\" target=\"_blank\" rel=\"noopener\">Schedule Online</a>\n                \n                <a href=\"tel:+{{ $('Business Info').item.json.company_phone }}\" class=\"btn\" style=\"background:#10b981;margin-left:8px;\">Call {{ $('Business Info').item.json.company_phone }}</a>\n              </div>\n\n              <p style=\"margin:0 0 8px 0;\">We look forward to getting this handled for you.</p>\n              <p style=\"margin:0 0 6px 0;\">The {{ $('Business Info').item.json.company_name }} Team</p>\n\n              <!-- Footer info -->\n              <hr style=\"border:none;border-top:1px solid #eee;margin:18px 0;\">\n              <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"font-size:12px;color:#6b7280;\">\n                <tr>\n                  <td>\n                    <div><strong>{{ $('Business Info').item.json.company_name }}</strong></div>\n                    <div>2421 New Easley Hwy, Greenville, SC 29611</div>\n                    <div><a href=\"{{ $('Business Info').item.json.website }}\" target=\"_blank\" style=\"color:#6b7280;text-decoration:underline;\">{{ $('Business Info').item.json.website }}</a> • {{ $('Business Info').item.json.company_phone }}</div>\n                  </td>\n                </tr>\n              </table>\n            </td>\n          </tr>\n\n          <!-- Tiny footer -->\n          <tr>\n            <td style=\"text-align:center;padding:12px 4px;color:#9ca3af;font-size:11px;\">\n              You’re getting this email because you requested service or matched with us on Angi.\n            </td>\n          </tr>\n        </table>\n      </td>\n    </tr>\n  </table>\n\n</body>\n</html>\n",
        "options": {
          "appendAttribution": false,
          "senderName": "Appliance GrandMasters"
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        2672,
        -32
      ],
      "id": "998282f4-a1ee-4236-b705-482a1b5acda0",
      "name": "Send a message1",
      "webhookId": "1ad099b3-3842-4b60-8e6d-796a021fa065",
      "credentials": {
        "gmailOAuth2": {
          "id": "RaTsrmolHvJbOjlm",
          "name": "Gmail GVL"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Clean Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Lead Info": {
      "main": [
        [
          {
            "node": "Business Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Parse Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        []
      ]
    },
    "Send an SMS/MMS/WhatsApp message": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Zip Code Coverage": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Send an SMS/MMS/WhatsApp message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger1": {
      "main": [
        [
          {
            "node": "Clean Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean Email": {
      "main": [
        [
          {
            "node": "Extract Lead Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Output": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Business Info": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "0e745ed2-7e8d-465a-a70f-d6e3c9478753",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "992f6b15ce9418f680548f917c88a9daa82a875a56a26e12ae36d126941f6f18"
  },
  "id": "ZfI0iqBXEyA1jdSQ",
  "tags": []
}